/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.tcc.view;

import java.net.URL;
import java.util.ResourceBundle;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;

/**
 *
 * @author Edidelson
 */
public class FXMLDocumentController extends FXMLGenerico implements Initializable, ControlledScreen {

    ScreensController myController;
    @FXML
    private Button btContasBancarias;
    @FXML
    private Button btReceitasDespesas;
    @FXML
    private BorderPane rootLayout;
    @FXML
    private Button btLancamento;
    @FXML
    private Button btGraficos;

    /**
     *
     * Initializes the controller class.
     *
     * @param url
     * @param rb
     */
    @Override
    public void initialize(URL url, ResourceBundle rb) {
    }

    @Override
    public void setScreenParent(ScreensController screenParent) {
        myController = screenParent;
    }

    @FXML
    public void vaiParaContasBancarias(ActionEvent event) {
        showPersonOverview(rootLayout, ScreensFramework.contasBancariasFile);
    }

    @FXML
    public void vaiParaReceitasDespesas(ActionEvent event) {
        showPersonOverview(rootLayout, ScreensFramework.receitaDespesaFile);
    }

    @FXML
    public void vaiParaLancamentos(ActionEvent event) {
        showPersonOverview(rootLayout, ScreensFramework.lancamentoFile);
    }

    @FXML
    public void vaiParaGrafico(ActionEvent event) {
        showPersonOverview(rootLayout, ScreensFramework.graficoFile);
    }

    @FXML
    public void sair(ActionEvent event) {
        //sai do sistema
        Platform.exit();
    }

}
